gmmktime
Get Unix timestamp for GMT date
gmmktime()
function returns the UNIX timestamp of the GMT date.
Tip: This function is the same as mktime()
, the difference is that the passed parameters represent the GMT date.
Returns the UNIX timestamp of the GMT date and then use it to find the days of that date:
<?php // Output: October 3, 1975 was on a Friday echo "Oct 3, 1975 was on a " . date ( "l" , gmmktime ( 0 , 0 , 0 , 10 , 3 , 1975 ) ) ; ?>
Try it yourself
gmmktime ( hour , minute , second , month , day , year , is_dst ) ;
parameter | describe |
---|---|
hour | Optional. Required hours. |
minute | Optional. Regulations points. |
second | Optional. Specified seconds. |
month | Optional. Required month. |
day | Optional. Specified days. |
year | Optional. Specified year. |
is_dst |
Optional. The parameters always represent the GMT date, so is_dst does not affect the result. Note: This parameter is deprecated in PHP 5.1.0. Instead, new time zone processing features are used. |